<template>
	<view class="login-box">
		<u-navbar :placeholder="true" class="login-box-nav" bgColor="transparent">
			<view class="login-box-nav-slot flex" slot="left">
				<u-icon name="arrow-left" color="#FFFFFF" size="20" @click="toBack" />
				<u-line direction="column" color="#91A5C3" :hairline="false" length="18" margin="0 18rpx" />
				<u-icon name="home" color="#FFFFFF" size="22" @click="toHome" />
			</view>
		</u-navbar>
		<image class="login-bg" src="/static/image/login_bg.png"></image>
		<!-- 主体内容 -->
		<Main />
	</view>
</template>

<script>
	import Main from './components/main.vue'
	export default {
		name: 'Login', // 登录页面
		components: {
			Main
		},
		data() {
			return {

			};
		},
		methods: {
			// 返回上一页
			toBack() {
				uni.navigateBack()
			},
			// 返回首页
			toHome() {
				uni.switchTab({
	url: '/pages/index/index'
});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.login-box {
		position: relative;
		z-index: 1;
		padding: 10rpx 30rpx;
		&-nav{
			&-slot{
				border: 2rpx solid #9e9e9e;
				border-radius: 50rpx;
				padding: 8rpx 20rpx;
				color: #FFFFFF;
			    background: rgba(0,0,0,.2);
			}
		}
	}
</style>
